<template>
    <div id="tmpl">
        <!-- 主播列表 -->
        <ul class="mui-table-view">
			<li class="mui-table-view-cell mui-media" v-for="item in anchorlist" :key="item.id">
				<router-link :to="'/anchor/anchorinfo/'+item.id">
					<img class="mui-media-object mui-pull-left" :src="item.aPortrait">
					<div class="mui-media-body">
						{{item.aNickname}}
						<p class='mui-ellipsis'>时间：{{nowtime | dateformat('YYYY-MM-DD HH:mm:ss')}}</p>
						<div class="ft">
							<span>粉丝量:{{item.aFans}}</span>
							<span class="institution">所属机构:{{item.aInstitution}}</span>
						</div>
					</div>
				</router-link>
			</li>
		</ul>
    </div>
</template>
<script>
import common from '../../kits/common.js'
export default {

    data(){
		return {
			nowtime: new Date(),
			anchorlist:[],
		}
	},

	created(){
		this.getAnchorlist();
	},

	methods:{
		getAnchorlist(){
			var url = common.apidomain + 'api/v1/anchor/'
			this.$http.get(url).then(function(response){
				this.anchorlist = response.data;
			})
		},
	},

}
</script>

<style scoped>
	.mui-table-view-cell mui-media{
		padding:2px;
	}
	.mui-table-view img{
		height:80px;
		width:80px;
	}	
	.mui-table-view .mui-media-object{
		max-width:80px;
	}
	.ft{
		margin-top: 1em;
		font-size: 14px;
		color: #0094ff;
	}
	.ft .institution{
		margin: 10px;
	}
</style>


